home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2320 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.pix.za!usenet
  2. From: js000021@pixie.co.za (Smit JS)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: printing graphics
  5. Date: Sat, 20 Jan 1996 06:19:15 GMT
  6. Organization: PiX - Proxima information X-change
  7. Message-ID: <4dqfhp$kb5@hawk.pix.za>
  8. References: <4dji10$qv8@walter.acs.nmu.edu>
  9. NNTP-Posting-Host: 196.23.60.108
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. goose@scam.acs.nmu.edu (goose) wrote:
  13.  
  14. >I have just written a program to graph simple functions and need a means 
  15. >to take the graph and send it to the printer.  Anyone have a clue as to 
  16. >how this could be done.
  17.  
  18. >Thanks in advance.
  19. >-goose
  20. Hi goose,
  21. Ja well you can run Graphics.com and do a printscreen, or you can
  22. consider that getpixel will return the colour of a pixel. That can be
  23. compared to the background colour, and if different, that pixel must
  24. be a 1 to the printer. To use the fputs function for output you also
  25. have to switch the stream to binary using the Dos ioctl function. I am
  26. assuming you are referring to  a Dos machine,you don't say. The
  27. printer must be switched to raster grahics, and then consider that for
  28. a lot of printers, one char will print 8 dots vertically. You will
  29. need the printer control codes, and I sure would love to have a source
  30. for printer raster graphic control codes.
  31. I recommend "Bitmapped Graphics in C++" by Marv Luse.
  32. Regards,
  33. Johan Smit
  34. js000021@pixie.co.za
  35.  
  36.